home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr28 / fill502.zip / FILL.DOC < prev    next >
Text File  |  1995-02-17  |  18KB  |  387 lines

  1. FILL.DOC
  2. 02/17/95
  3.  
  4. The FILL program is designed to help you move or copy files off a hard disk
  5. while reducing the amount of wasted space on the destination disks.  Internally,
  6. it does this by sorting the file names so the largest files are moved/copied
  7. first.  It then moves or copies whatever files can fit on the floppy, skipping
  8. any that can't.  Features:
  9.  
  10.   * Can either move or copy the files to the resulting location
  11.   * Can go onto to multiple diskettes as desired, beeping if desired when
  12.     the next disk is expected
  13.   * Can move the files in file name order or any of standard ordering
  14.     categories
  15.   * Can be used to split up files which are too big to fit on a single disk
  16.   * Can create a status/transaction file for you, showing what was copied/moved
  17.   * Can label the output diskette, providing some patterns like sequence numbers
  18.     and dates which it will fill in for you
  19.   * Some times useful for network transfers where standard MOVE command doesn't
  20.     always work
  21.   * Can review and delete if desired any files which are already in the
  22.     output destination (e.g. already on the output diskette)
  23.   * Can reformat the whole disk if files are going to drive A or B
  24.   * Can specify an input file ("@flistfile") which contains the files to be
  25.     copied.
  26.  
  27. Limits:
  28.   * Routine can only process the first 500 files found.  It ignores the rest of
  29.     them.
  30.   * Routine can only review for deletion the first 200 files in the output
  31.     location.
  32.   * Routine does not provide any cool features to fix up destination drives
  33.     that have surface errors.  If it encounters an error, it just beeps, gives
  34.     you an error message, and returns to DOS.
  35.   * Routine will not format the output diskette for you.
  36.   * Routine's continual testing for new diskette (/CONTINUAL) only works if the
  37.     diskette was formatted using DOS 4.0 or later.  That's the version that
  38.     puts volume sequence numbers on the diskettes.  One way to insure this if
  39.     you're using the newer versions of DOS is to do a quick-reformat of your
  40.     floppies whenever you'd normally do a DEL A:*.*.  I do this with a QDR.BAT
  41.     command that has the following:
  42.  
  43.         FORMAT %1 /Q /U /V:Bruce
  44.  
  45.     I then say "QDR A:" or "QDR B:".  It invokes an unconditional quick format
  46.     and applies a volume label on the diskette (to avoid the prompt).  If the
  47.     diskette does not have a sequence number, DOS tells you it can't be
  48.     quick-formatted and asks if it can do the full format instead.
  49.  
  50.  
  51.  
  52. Note on copying/moving files to multiple diskettes:
  53.  
  54. I didn't think this was confusing but a lot of people don't seem to understand
  55. the technique of how files are moved to multiple diskettes.
  56.  
  57. Let's say you have six files:
  58.  
  59.         A_FILE.ZIP      500K
  60.         B_FILE.ZIP      300K
  61.         C_FILE.ZIP      650K
  62.         D_FILE.ZIP      200K
  63.         E_FILE.ZIP      450K
  64.         F_FILE.ZIP       25K
  65.  
  66. You're moving these files to blank 1.2MB diskettes and you have the default
  67. /MULTI and /ON settings.  The program checks how much space is available on the
  68. destination drive and comes back with 1.2MB.
  69.  
  70. It scans the input files and internally sorts them by descending size.  It then
  71. looks for the biggest file in the file list and comes back with C_FILE.ZIP at
  72. 650K.  Will this file fit on the destination drive?  Yes.  It retains that
  73. information, figures there is now 550K left on the output drive, and checks for
  74. the second biggest file.  A_FILE.ZIP is 500K.  Will that also fit?  Yes.  So now
  75. there's 50K left.  The next biggest file is E_FILE.ZIP at 450K.  Will that fit?
  76. Nope.  Check the next biggest.  This continues until it reaches the file
  77. F_FILE.ZIP which is only 25K.  That's the biggest file that will fit in the
  78. remaining 50K.
  79.  
  80. So it has three files to move.  What order should it move them?  You have /ON
  81. set so it's going to move them in file name order.  So it moves the following
  82. files in the following order:
  83.  
  84.         A_FILE.ZIP      500K
  85.         C_FILE.ZIP      650K
  86.         F_FILE.ZIP       25K
  87.  
  88. Next diskette.  Same process.  This time it processes the remaining files:
  89.  
  90.         B_FILE.ZIP      300K
  91.         D_FILE.ZIP      200K
  92.         E_FILE.ZIP      450K
  93.  
  94.  
  95. Specifying parameters:
  96.  
  97. Parameters for this program can be set in the following ways.  The last setting
  98. encountered always wins:
  99.   - Read from an *.INI file (see below),
  100.   - Through the use of an environmental variable (SET FILL=whatever), or
  101.   - From the command line (see "Syntax" below)
  102.  
  103.  
  104. The FILL.INI file:
  105.  
  106. FILL will read a FILL.INI file if one is found.  (You can specify a different
  107. file name if desired.) The file is an ASCII text file that can be created
  108. maintained by hand.  The file can consist or one or more command line
  109. parameters (only those that begin with a "/"; no multi-word ones), one statement
  110. per line.
  111.  
  112. The file can also contain comments which are blank lines or any line beginning
  113. with:
  114.         ;    (semi-colon)
  115.         :    (colon)
  116.         '    (quote)
  117.  
  118. FILL looks for the initialization file in your default subdirectory first.  It
  119. then searches for it in the subdirectory where the executable was and then goes
  120. through your DOS path.
  121.  
  122. Passing in "/-I" or "/INULL" skips loading the INI file.  This saves some
  123. execution time as the program does not need to search your path for the file.
  124.  
  125.  
  126. Syntax:
  127.  
  128.     FILL [ source-filespec | @flistfile ]
  129.       [ [ /TO ] dest-drive: | [ /TO ] dest-drive:\path\ ]
  130.       [ /MOVE | /COPY ] [ /PROMPT | /-PROMPT ] [ /Iinitfile | /-I ]
  131.       [ /OVERWRITE | /-OVERWRITE | /OVERSKIP | /OVERASK ]
  132.       [ /Ox | /O-x ] [ /Xfilespec ]... [ /WIPE | /-WIPE ] [ /MULTI | /SINGLE ]
  133.       [ /SPLIT ] [ /LABEL=label [ /START=n ] ] [ /Fstatfile [ /S+ | /S- | S* ]
  134.       [ /CONTINUAL ] [ /TIME | /-TIME ] [ /BEEP | /-BEEP ]
  135.       [ /FAKE ] [ /Q ] [ /? ]
  136.  
  137. where:
  138.  
  139. "source-filespec" is the file specification for what you want to move.  You can
  140. specify a drive and path and file wildcards if necessary (e.g.  "C:\TEMP\*.BAT")
  141. but otherwise it defaults to your default drive and directory and takes "*.*".
  142. Note that the program cannot handle any request for more than 500 files at a
  143. time.
  144.  
  145. "@flistfile" allows you to have a variety of file specifications saved in a text
  146. file named "flistfile".  You cannot have more than 50 file specifications in
  147. this file (and you're still limited to the 500 files total).  Each line should
  148. consist of a file name with optional drive and path information.  Blank lines
  149. and lines beginning with semi-colons, colons, or quotes are ignored.
  150.  
  151. "dest-drive:" or "dest-drive:\path" (or "/TO dest-drive:" or "/TO
  152. dest-drive:\path") tells the routine what drive or path to move the files to.
  153. In many cases, the routine doesn't really care whether the source specification
  154. precedes or follows the destination specification.  If either parameter ends
  155. with a colon (e.g. "A:") or slash (e.g. "C:\QB45\"), the routine will presume
  156. that's the destination specification and the other one must be the source
  157. specification.  If either parameter contains a wildcard, the routine will
  158. presume that's the source specification and the other one must be the
  159. destination specification.  So "FILL A: *.BAS" is the same as "FILL *.BAS A:".
  160. The original default is "A:" (or "/TO A:").
  161.  
  162. "/MOVE" says to move the files instead of copying them.  Initially defaults to
  163. "/MOVE".
  164.  
  165. "/COPY" says to copy the files instead of moving them.  Initially defaults to
  166. "/MOVE".
  167.  
  168. "/PROMPT" says to prompt for each filename before moving it.  Initially defaults
  169. to "/-PROMPT".
  170.  
  171. "/-PROMPT" says to not prompt for each file.  Initially defaults to "/-PROMPT".
  172.  
  173. "/Iinitfile" says to read an initialization file with the file name "initfile".
  174. The file specification *must* contain a period.  If no drive or path information
  175. is specified, the program will search for initfile beginning in your default
  176. subdirectory and then going throughout your DOS path.  The use of an
  177. initialization file is optional.  Initially defaults to "/IFILL.INI".
  178.  
  179. "/-I" (or "/INULL") says to skip loading the initialization file.
  180.  
  181. "/OVERWRITE" says to overwrite same-named files in the destination path.
  182. Initially defaults to "/OVERSKIP".
  183.  
  184. "/-OVERWRITE" says to abort if any same-named files are found in the destination
  185. path.  Initially defaults to "/OVERSKIP".
  186.  
  187. "/OVERSKIP" says to skip any file that already exists in the destination path.
  188. The counts aren't accurate in this case.  This is initially the default.
  189.  
  190. "/OVERASK" says to prompt if same-named files exist in the destination
  191. directory.  Initially defaults to "/OVERSKIP".
  192.  
  193. "/Ox" and "/O-x" allow you to specify the copy order for the files.  "x" can be
  194. one of the following:
  195.  
  196.         N = file name
  197.         D = file date and time
  198.         S = file size
  199.  
  200. If you precede the "x" with a dash ("-"), the sort will be done in reverse
  201. order.  Note that this parameter does not determine which files are copied; it
  202. only determines what order they are actually copied.  Since the order that the
  203. file tends to show up in a DOS DIR listing is based on creation order, this
  204. sequence may be relevant to how the files ultimately show up.  Initially
  205. defaults to "/ON".
  206.  
  207.  
  208. "/Xfilespec" says to exclude certain filespecs from being moved.  You can
  209. specify up to 10 exclusion parameters but each must have their own /Xfilespec
  210. statement.  For example, to move all files except those with a BAS extension,
  211. you could say "FILL /X*.BAS".
  212.  
  213. "/WIPE" says that if the destination drive has files on it, prompt the user
  214. for whether these files should be deleted or not.  Six sub-options show up in
  215. this case:
  216.  
  217.     Do *NOT* delete the x file(s)    Don't delete anything
  218.     List file(s)                     List the files but don't delete any of
  219.                                      them.  The user will be reprompted for
  220.                                      these four options after pressing a key.
  221.     Select file(s) to delete         List the files and allow the user to
  222.                                      select any to be deleted.  Keys:
  223.                                         * Cursor keys -- move among list
  224.                                         * Space       -- select that file
  225.                                         * Ctrl-Enter  -- select all files
  226.                                         * Ctrl-bs     -- deselect all files
  227.                                         * Enter       -- process those tagged
  228.                                         * Esc         -- skip processing
  229.                                      After pressing Enter, the selected files
  230.                                      will be deleted.  You will then get the
  231.                                      standard four prompts again.
  232.     Delete all file(s)               Delete all files in the specified
  233.                                      directory.  Subdirectory files will not
  234.                                      be deleted.
  235.     Reformat the diskette            If your output drive is either A or B,
  236.                                      the program will shell to DOS and execute
  237.                                      a "FORMAT d:" command.  This (and the
  238.                                      next) sub-option will result in the
  239.                                      subdirectories being eliminated, something
  240.                                      which the prior sub-options don't do for
  241.                                      you.
  242.     Quick-reformat the diskette      If your output drive is either A or B
  243.                                      and you're running under DOS 5.0 or higher,
  244.                                      the program will shell to DOS and execute
  245.                                      a "FORMAT d: /Q" command.
  246.  
  247. Initially defaults to "/-WIPE".
  248.  
  249. "/-WIPE" reverses /WIPE.  Initially defaults to "/-WIPE".
  250.  
  251. "/MULTI" says to go to a second disk if all of the files can't fit on the first
  252. diskette.  Initially defaults to "/MULTI".
  253.  
  254. "/SINGLE" says process only one diskette at a time and to not prompt for the
  255. next diskette once the first gets filled up.  Initially defaults to "/MULTI".
  256.  
  257.  
  258. "/SPLIT" says to split up large files which otherwise would not be able to fit
  259. onto the output disk.  For example, /SPLIT is useful when you have a 1.8MB file
  260. that you're trying to copy or move to a 1.2MB or 1.44MB diskette.  Files are
  261. split only if an empty diskette in the output destination would not be able to
  262. support the file; it will not split up a 800KB file just because the 1.2MB
  263. output diskette only has 600KB free.  Files will be given the extensions of
  264. .001, .002, etc until all necessary splitting is accomplished.  To put them back
  265. together again, use the DOS COPY copy with the /B option.  For example:
  266.  
  267.         COPY TEST.001/B+TEST.002/B TEST.ZIP
  268.  
  269. "/LABEL=label" specifies the volume label to be written to the output disk.
  270. By default, the label is not changed.  The label can be a quoted mixed-case
  271. string.  It can contain several replaceable lowercase only parameters: "mm" is
  272. replaced with the two-digit month, "dd" is replaced with the two-digit day, "yy"
  273. is replaced with the two-digit year, and "n" or "nn" or "nnn" is replaced by the
  274. sequence number of the disk.  All numeric fields are padded to the left with
  275. zeroes as necessary.  If the current date is November 7, 1993:
  276.  
  277.         /LABEL="BKyymmdd nn"
  278.  
  279. will label the first first "BK931107 01", the second disk "BK931107 02" etc.
  280. Note that labels can be no longer than 11 characters in length.  All characters
  281. except the replaceable parameters will be translated to uppercase characters.
  282.  
  283. "/START=n" specifies the first sequence number to use in place of "n", "nn", or
  284. "nnn" in the /LABEL parameter.  Defaults to "/START=1".
  285.  
  286. "/Fstatfile" specifies the name of a status file to be used.  This status file
  287. is a text file that reports on what's been processed by the program.  If it
  288. exists already, the status file is appended to, not overwritten.  A sample of
  289. some lines from the status file using the /S* option (which is not the default):
  290.  
  291.   FILL results for  /copy *.exe /ftest.txt /beep /wipe /s* /split
  292.   Being run on 11-07-1993 at 17:58:10
  293.  
  294.   Label        FileName    Date     Time                Size Operation
  295.  
  296.   TEST93 #01   AV.EXE       09/29/93 00:50:58          70,282 SKIP
  297.   TEST93 #01   BC.EXE       08/19/92 23:59:00         150,562 SKIP
  298.   TEST93 #01   BFIND.EXE    08/02/93 23:07:08          60,016 SKIP
  299.   TEST93 #01   VBDOS.EXE    08/19/92 23:59:00         555,520 COPY
  300.  
  301.   BRUCE        AV.EXE       09/29/93 00:50:58          70,282 SKIP
  302.   BRUCE        BC.EXE       08/19/92 23:59:00         150,562 SKIP
  303.   BRUCE        BFIND.EXE    08/02/93 23:07:08          60,016 SKIP
  304.  
  305. "/S+" specifies that the only files to be written to the status file are those
  306. files that actually get copied/moved.  This is the default.
  307.  
  308. "/S-" specifies that the only files to be written to the status file are those
  309. files that did not get copied/moved.  Since the skipping is determination is
  310. done with each disk, the status file may show the same file name as "SKIP" over
  311. and over again.
  312.  
  313.  
  314. "/S*" specifies that the status report should contain all files copied/moved as
  315. well as skipped.  This can be a huge report.
  316.  
  317. "/CONTINUAL" is used if you want the routine to continually check your floppy
  318. drive to see when a new diskette has been put in and continue once it recognizes
  319. this has happened.  The only time you'd have to press a key is if you want to
  320. stop processing diskettes (in which case you'd press Escape).  This option is
  321. only available if you're using DOS 4.0 or higher and only works for disks that
  322. have been formatted using DOS 4.0 or higher (it uses the serial number on the
  323. disk in order to determine that the disk has been replaced).
  324.  
  325. "/TIME" says to show how much time it took for the transfers, showing you
  326. a bytes copied/moved per second.
  327.  
  328. "/-TIME" says to skip the bytes per second information.  This is initially
  329. the default.
  330.  
  331. "/BEEP" says to beep once the routine is done doing its thing (a high tone
  332. followed by a low one).  It will also beep whenever it's time to stick in a new
  333. diskette (a low tone followed by a high one).  Initially defaults to "/BEEP".
  334.  
  335. "/-BEEP" says to not beep upon completion.  Initially defaults to "/-BEEP".
  336.  
  337. "/FAKE" turns off the actual copying of files.  It basically puts you into
  338. simulation mode so you can see what it would do, how many disks it would take,
  339. et cetera.
  340.  
  341. "/Q" turns off the file-by-file status reporting.
  342.  
  343. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  344.  
  345.  
  346. Return codes:
  347.  
  348. FILL returns the following ERRORLEVEL codes:
  349.         0 = no problems, all files copied
  350.         1 = no problems, but some files skipped since /-MULTI
  351.       250 = too many entries in @flistfile file
  352.       251 = couldn't find @flistfile file
  353.       252 = had DOS errors copying/moving the files (bad sectors found)
  354.       253 = had problems copying/moving the files
  355.       254 = no files found to copy/move
  356.       255 = syntax problems, or /? requested
  357.  
  358.  
  359.  
  360. Author:
  361.  
  362. This program was written by Bruce Guthrie of Wayne Software.  It is free for use
  363. and redistribution provided relevant documentation is kept with the program, no
  364. changes are made to the program or documentation, and it is not bundled with
  365. commercial programs or charged for separately.  People who need to bundle it in
  366. for-sale packages must pay a $50 registration fee to "Wayne Software" at the
  367. following address.
  368.  
  369. Additional information about this and other Wayne Software programs can be found
  370. in the file BRUCEymm.DOC which should be included in the original ZIP file.
  371. ("ymm" is replaced by the last digit of the year and the two digit month of the
  372. release.  BRUCE312.DOC came out in December 1993.  This same naming convention
  373. is used in naming the ZIP file that this program was included in.) Comments and
  374. suggestions can also be sent to:
  375.  
  376.                 Bruce Guthrie
  377.                 Wayne Software
  378.                 113 Sheffield St.
  379.                 Silver Spring, MD 20910
  380.  
  381.                 fax: (301) 588-8986
  382.  
  383. See BRUCEymm.DOC file for additional contact information.
  384.  
  385. Foreign users:  Please provide an Internet e-mail address in all correspondence.
  386.  
  387.